Skip to content

Update setup.rst #7058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Update setup.rst #7058

wants to merge 1 commit into from

Conversation

jagonzaar
Copy link

I put some code that resolve some problems in windows 10 with xampp, without using composer.

I put some code that resolve some problems in windows 10 with xampp, without using composer.
@linaori
Copy link
Contributor

linaori commented Oct 16, 2016

Isn't it possible to simply call php instead of php.exe? Seems like an issue within xampp and windows 10, not in the docs.

@@ -32,6 +32,9 @@ executable that needs to be installed on your system only once:

# Windows systems
c:\> php -r "readfile('https://symfony.com/installer');" > symfony

# Windows 10 and xampp (whit the "PATH" environment variable defined in "c:\xampp\php'
c:\> php.exe -r "readfile('https://symfony.com/installer');" > symfony
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed, when c:\xampp\php is in your PATH, php will be resolved to c:\xampp\php\php.exe by Windows

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right... I used php (not php.exe) and that's works...

@@ -52,6 +55,9 @@ executable that needs to be installed on your system only once:
# ... then, execute the command as
c:\> cd projects
c:\projects\> php symfony
# in windows 10 with xampp...
c:\> cd projects
c:\projects\> php.exe symfony
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same applies here (and below)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right... I used php (not php.exe) and that's works...
The only problem is that
c:\projects> php symfony
doesn't create another file. I need use "php symfony" each time that must use symfony.
When I try symfony alone, I have errors:
c:\xampp\htdocs\symfonywebs>symfony
'symfony' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
the file 'symfony' is the PATH directory and in the directory where I execute that command.
What can be the problem?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correction: the file symfony is in the PATH....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows doesn't understand the shebang that indicates with which command a file should be run.

So you have to create a custom bat file to make symfony executable on Windows. Something along the lines of:

@echo
php "C:\path\to\symfony" %*

(the @echo part avoids the command being outputted to the screen, the next line indicates what command should be run (php ...) and %* tells Windows to pass all arguments passed to this bat file to the command)

@@ -72,6 +81,19 @@ to meet those requirements.

If the installer doesn't work for you or doesn't output anything, make sure
that the PHP `Phar extension`_ is installed and enabled on your computer.
In windows 10 with xampp, if you have un error like
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "un" should be "an"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry... is my "spanglish"!

@@ -72,6 +81,19 @@ to meet those requirements.

If the installer doesn't work for you or doesn't output anything, make sure
that the PHP `Phar extension`_ is installed and enabled on your computer.
In windows 10 with xampp, if you have un error like
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is an error that occurs in all cases on Windows. So let's make a bit more generic:

.. note::

    If you're on Windows, you might get this error:

        cURL error 60: SSL certificate problem: unable to get local issuer certificate.

    In this case, download this link: http://curl.haxx.se/ca/cacert.pem and move the
    file on your computer. Then edit your `php.ini` file and insert:

    .. code-block:: ini

        curl.cainfo = "C:\path\to\cacert.pem"

@jagonzaar
Copy link
Author

Thanks for the idea. I tried with php (when the path is defined) instead of php.exe and that's works...

  From: Iltar van der Berg <notifications@github.com>

To: symfony/symfony-docs symfony-docs@noreply.github.com
Cc: jagonzaar jagonzaar@yahoo.com; Author author@noreply.github.com
Sent: Sunday, October 16, 2016 4:35 PM
Subject: Re: [symfony/symfony-docs] Update setup.rst (#7058)

Isn't it possible to simply call php instead of php.exe? Seems like an issue within xampp and windows 10, not in the docs.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setup.rst article is probably the most critical article for us, because it's usually the entry point for Symfony newcomers. So we must be extra careful when making any changes.

I agree with @wouterj's proposal to add a note about the certificate problems. But I wonder if we need to add the other changes about Windows 10 and XAMPP.

@javiereguiluz
Copy link
Member

@jagonzaar thanks for contributing these improvements. However, as Wouter explained, most of the changes are not required because php will also work on Windows systems. That's why we can close this as "won't fix" ... except for the cURL certificate problem, which is very important/common ... and not only for Windows, so I've opened #7492 to fix it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants